Channel encoding is usually used in a communications system, to improve data transmission reliability and ensure communication quality. A polar (polar) code is the first channel encoding method that can be strictly proved to “achieve” a channel capacity. The polar code is a type of linear block code, a generator matrix of the polar code is GN, an encoding process of the polar code is x1N=u1NGN, and u1N=(u1, u2, . . . , uN) is a binary row vector with a length N (namely, a code length). GN=BNF2⊗(log2(N)). Herein,
            F      2        =          [                                    1                                0                                                1                                1                              ]        ,BN is an N×N transposed matrix, for example, a bit-reversal-order transposed matrix, F2⊗(log2(N)) is defined as a Kronecker (Kronecker) product of log2 N matrices F2, x1N is encoded bits (also referred to as a code word), and the encoded bits are obtained after u1N is multiplied by the generator matrix GN. A multiplication process is the encoding process. In the encoding process of the polar code, some bits in u1N are used to carry information and are referred to as information bits, and an index set of the information bits is denoted as A. The other bits in u1N are set to fixed values that are agreed on by a transmit end and a receive end in advance, and are referred to as frozen bits, and an index set of the frozen bits is represented by a complementary set Ac of A. The frozen bits are usually set to 0. A sequence of the frozen bits may be set to any values if the transmit end and the receive end reach an agreement in advance. To improve performance of the polar code, an outer code with a check capability may be concatenated with the polar code. CA-polar code is a polar code concatenated with a cyclic redundancy check (CRC) code.
An encoding process of the CA-polar code is as follows: CRC encoding is performed on information bits of to-be-encoded information, to obtain a bit sequence after the CRC encoding, where the bit sequence obtained after the CRC encoding includes information bits and CRC bits; then, polar encoding is performed on the bit sequence obtained after the CRC encoding. A CA-SCL (CRC-Aided Successive Cancellation List) decoding algorithm is used for decoding the CA-polar code. After SCL decoding ends, CRC check is performed on L candidate paths that are output after the SCL decoding, and a candidate path whose CRC check succeeds is used as a decoding output result. If there is no candidate path whose CRC check succeeds, it is determined that the decoding fails. Therefore, for the CA-polar code, CRC check can be performed only after channel decoding ends, and time occupied for a failed decoding process is the same as time occupied for a successful decoding process. In a scenario of downlink blind detection on a control channel in a wireless communications system, dozens of decoding attempts usually need to be made, but a maximum of one decoding attempt can succeed. If a decoding attempt that results in a decoding failure can be stopped in advance (early termination), a decoding delay and average energy consumption of the entire blind detection can be effectively reduced. Distributed CRC encoding is put forward as a CRC encoding manner with an “early termination” capability. During the distributed CRC encoding, an interleaving operation is introduced after conventional CRC encoding ends; to be specific, CRC bits obtained after CRC encoding are distributed among information bits. In an SCL decoding process of a decoder, at a moment before decoding ends, when none of candidate paths can meet check of some CRC bits that have been decoded, the decoding can end in advance.
The interleaving operation is performed by using a pre-stored interleaving sequence. Because a CRC encoding process is related to an information bit quantity, a length of the interleaving sequence is the same as the information bit quantity. If a system needs to support an excessively large quantity of information bits, the system needs to store a large quantity of interleaving sequences. Consequently, system storage overheads are relatively high.